
package cn.webrx;

import java.util.Scanner;

public class InputDemo {
    public static void main(String[] args) {
        //
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入姓名：");
        String name = sc.nextLine();
        System.out.printf("欢迎：%s%n", name);

        System.out.println();
        System.out.printf("请输入年龄：%n");
        int age = sc.nextInt();
        System.out.printf("年龄：%d岁。", age);
    }
}
